class Person:
    name = "user"


class Student(Person):
    def __init__(self, school_name):
        self.school_name = school_name


if __name__ == '__main__':
    user = Student("游泳巷")

    # 通过__dict__查询属性
    print(user.__dict__)
    # 修改属性
    user.__dict__["school_name"] = "北京"
    print(user.__dict__)
    print(Person.__dict__)

    # dir 比dict更丰富，列出它所有的属性
    print(dir(user))
